{% extends "recommendation/shared.html" %}

{% block title %}
Recommendations
{% endblock %}

{% block extra_head %}
	<script type="text/javascript" src="{{ STATIC_URL }}results.js"></script>
{% endblock %}

{% block content %}
	<div class="paragraph">
		<form id="moviesSLD" action="" method="post">
			{% csrf_token %}
			<table>
				<tr><th>Title</th><th>Year</th><th>About The Movie</th><th>Trailer</th><th>Already Seen</th><th>Like</th><th>Blacklist</th></tr>
				{% for title,year,link,liked,seen,blacklisted in results %}
					<tr>
						<td id="titleTD" style="">{{ title }}</td>
						<td>{{ year }}</td>
						<td><a href="{{ link }}"><img class="tinyImg" src="{{ STATIC_URL }}images/info.png" alt="Info" title="Info" /></a></td>
						<td><a href="{{ link }}videogallery"><img class="tinyImg" src="{{ STATIC_URL }}images/filmTake.png" alt="Trailer" title="Trailer" /></a></td>
						<td><input id="s{{ forloop.counter }}" type="checkbox" name="seen" value="{{ title }}" onclick="seenBtn(event)" {%if seen%}checked="checked"{%endif%} /></td>
						<td><input id="l{{ forloop.counter }}" type="checkbox" name="like" value="{{ title }}" onclick="likeBtn(event)" {%if liked%}checked="checked"{%endif%} {%if blacklisted%}disabled="disabled"{%endif%} /></td>
						<td><input id="b{{ forloop.counter }}" type="checkbox" name="blacklist" value="{{ title }}" onclick="blacklistBtn(event)" {%if blacklisted%}checked="checked"{%endif%} {%if liked%}disabled="disabled"{%endif%} /></td>
					</tr>
				{% endfor %}
			</table>
			{% for title,link,liked,seen,blacklisted in results %}
				<input type="hidden" name="movieList" value="{{ title }}" />
			{% endfor %}
			<div class="helpSheet">
				Here you can see, in order from best match to least, the movie we think will be
				most suitable for you to watch.
				Under 'About The Movie' you have a link to IMDB's review of this movie.
				Under 'Trailer' you have a link to IMDB's trailer for this movie.
				<br /><br />
				You can check or uncheck any of the movies in order to add / remove them from the appropriate list.
				Don't forget to click the 'Save' button when you're done in order to save the changes.
			</div>
			<br />
			<input style="margin-left:365px;" id="submit" type="image" src ="{{ STATIC_URL }}images/buttons/save.png" value="Save Changes" />
			<br/><br/>
			<a href="../">Back to search options</a>
		</form>
	</div>
{% endblock %}
